﻿#region summary

// Copyright (c)  YISH. All rights reserved.
// Licensed under the MIT License, See License.txt in the project root for license information.

#endregion

namespace NSQL.Expressions
{
    /// <summary>
    /// Represents int,float,double .etc
    /// </summary>
    public interface INumericExpression : IExpression
    {
    }

    public static class NumericExpressionExtensions
    {
        public static IArithmeticExpression Add(this INumericExpression numeric, NumericExpression value)
        {
            return new ArithmeticExpression(numeric, value, ArithmeticOperator.Plus);
        }

        public static IArithmeticExpression Plus(this INumericExpression numeric, NumericExpression value)
        {
            return new ArithmeticExpression(numeric, value, ArithmeticOperator.Plus);
        }

        public static IArithmeticExpression Minus(this INumericExpression numeric, NumericExpression value)
        {
            return new ArithmeticExpression(numeric, value, ArithmeticOperator.Minus);
        }

        public static IArithmeticExpression Multiply(this INumericExpression numeric, NumericExpression value)
        {
            return new ArithmeticExpression(numeric, value, ArithmeticOperator.Multiply);
        }

        public static IArithmeticExpression Divide(this INumericExpression numeric, NumericExpression value)
        {
            return new ArithmeticExpression(numeric, value, ArithmeticOperator.Divide);
        }
    }
}